<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/jquery-ui-1.8.18.custom.min.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Administrator System</title>
<link href="css/admin-style.css" rel="stylesheet" type="text/css" />
<link href="css/admin-ui/jquery-ui-1.8.18.custom.css" rel="stylesheet" type="text/css" />
<style>
ul#icons {margin: 0; padding: 0;}
ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left;  list-style: none;}
ul#icons span.ui-icon {float: left; margin: 0 4px;}
</style>
<script>
	$(function() {
		//buton script//
		$( "input:submit").button();
		
	
		$('form').submit(function() {
			$.post(
				'dologin.php',
				$(this).serialize(),
				function(data){
					if(data != ''){
						$("#msg").html(data);
						$( "#dialog" ).dialog({
							modal: true,
							buttons: {
								Ok: function() {
									$( this ).dialog( "close" );
								}
							}
						});
					}else{
						window.location='admin.php?username=<?=$_SESSION['username']?>';	
					}
					//alert(data);
				});
			  return false;
		});

	});
	</script>
</head>
<body>
<div id="dialog" title="Message"  style="display:none;">
	<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span><span id="msg" class="formlb"></span></p>
</div>
	<div id="wrapper">
    	<div class="ui-widget-header" id="header">
        	<ul id="icons" class="ui-widget ui-helper-clearfix">
            	<li>Website Control Panel</li>
				<li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-home"></span></li>
                <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-wrench"></span></li>
                <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-gear"></span></li>
                <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-mail-closed"></span></li>
                <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-comment"></span></li>
                <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-document"></span></li>
                <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-plusthick"></span></li>    
                <div style="clear:both;"></div>
          </ul>
        </div>
      <div class="ui-state-default company"><span style="font-weight:normal;">Central Insurance Broker</span></div>
      <div class="ui-widget-content" id="container">
       	  <div class="login">
            	<div class="ui-widget-header head_login">
           				<span class="ui-icon ui-icon-power" style="float:left;"></span>
                        <span style="font-size:13px;float:left;">Administrator Login</span>
                        <div style="clear:both;"></div>
            	</div>
            <div class="form">
            	<form method="post">
                	<table border="0" align="center" cellpadding="3" cellspacing="0">
                      <tr>
                        <td class="formlb">Username</td>
                        <td><label for="username"></label>
                        <input type="text" name="username" id="username" /></td>
                      </tr>
                      <tr>
                        <td class="formlb">Password</td>
                        <td><label for="password"></label>
                        <input type="password" name="password" id="password" /></td>
                      </tr>
                      <tr>
                        <td colspan="2" align="center"><input style="font-size:12px; font-weight:normal;" type="submit" name="button" id="button" value="LOGIN" /></td>
                      </tr>
                    </table>
              </form>
            </div>
          </div>
        </div>
      <div id="footer">Copyright © 2012 Central Insurance Broker Co.,Ltd. All rights reserved. Powered by <a class="link" href="http://www.show-idea.com/">Show-idea</a></div>
    </div>
</body>
</html>
